/**
 * Created by Administrator on 2015/12/29.
 */
angular.module('maincontent.service',[])
  .service('mainContentService',['$http','appItfAopService',function($http,appItfAopService){

    var params={ 
        "Depart_Code": "-1", //当月业务量
        "User_ID": "-1",//当月收费
        "Phone": "-1",//账户余额
        "Type_ID": "-1",
    }
    return {
      getParams:function() {
        return params;
      },
      //调用
      get_NavInfo:function()
      {
        return appItfAopService.do_get_NavInfo_req()
      },
      //调用
      get_twoLayerNavInfo: function (params)
      {
          return appItfAopService.do_get_twoLayerNavInfo_req(params)
      },
      //获得当月的第一天
      get_MonthFristDay:function()
      {
        var myDate = new Date();
        var year = myDate.getFullYear();
        var month = myDate.getMonth()+1;
        if (month<10){
          month = "0"+month;
        }
        var firstDay = year+"-"+month+"-01 00:00:00";
        return firstDay;
      },
      //获取当月的最后一天
      get_MotnthLastDay:function()
      {
        var myDate = new Date();
        var year = myDate.getFullYear();
        var month = myDate.getMonth()+1;
        if (month<10){
          month = "0"+month;
        }
        myDate=new Date(year,month,0);
        var lastDay=year+"-"+month+"-"+myDate.getDate()+" 23:59:59";
        return lastDay;
      },
      //插入日志
      insertLog:function(param)
      {
        return appItfAopService.do_insertLog_req(param);
      }

    }

  }]);
